<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>系统管理员</title>
<link rel="stylesheet"
	href="http://localhost:8080/vote/css/SystemAdmin.css">
<script src="http://localhost:8080/vote/js/jquery-3.3.1.js"></script>
<link rel="stylesheet"
	href="http://localhost:8080/vote/layui/css/layui.css">
<script src="http://localhost:8080/vote/layui/layui.js"></script>
<script src="http://localhost:8080/vote/js/SystemAdmin.js"></script>
</head>
<body>
	<ul class="layui-nav">
		<li class="layui-nav-item"><a href="">控制台<span
				class="layui-badge">9</span></a></li>
		<li class="layui-nav-item"><a href="">个人中心<span
				class="layui-badge-dot"></span></a></li>
		<li class="layui-nav-item"><a href=""><img
				src="//t.cn/RCzsdCq" class="layui-nav-img">我</a>
			<dl class="layui-nav-child">
				<dd>
					<a href="javascript:;">修改信息</a>
				</dd>
				<dd>
					<a href="javascript:;">安全管理</a>
				</dd>
				<dd>
					<a href="javascript:;">退了</a>
				</dd>
			</dl></li>
	</ul>
	<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"
		style="width: 1100px; margin-right: auto; margin-left: auto;">
		<ul class="layui-tab-title">
			<li class="layui-this">录入用户信息</li>
			<li>录入歌手比赛信息信息</li>
			<li>信息管理</li>
			<li>录入歌手信息</li>
			<li>订单管理</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show" style="height: 550px;">
				<form class="layui-form" action=""
					style="width: 550px; margin-left: auto; margin-right: auto; margin-top: 20px">
					<div class="layui-form-item">
						<label class="layui-form-label">用户账号:</label>
						<div class="layui-input-block">
							<input type="text" name="usercode" required lay-verify="required"
								placeholder="请输入用户账号" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">用户名:</label>
						<div class="layui-input-block">
							<input type="text" name="username" required lay-verify="required"
								placeholder="请输入用户名" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">密码框</label>
						<div class="layui-input-inline">
							<input type="password" name="password" required
								lay-verify="required" placeholder="请输入密码" autocomplete="off"
								class="layui-input">
						</div>
						<div class="layui-form-mid layui-word-aux">由数字 字母组成，不得小于六位。</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">手机号:</label>
						<div class="layui-input-block">
							<input type="text" name="usertmp" required lay-verify="required"
								placeholder="请输入手机号" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">邮箱号:</label>
						<div class="layui-input-block">
							<input type="text" name="useremail" required
								lay-verify="required" placeholder="请输入邮箱号" autocomplete="off"
								class="layui-input">
						</div>
					</div>
                    <div class="layui-form-item" style="display:none">
						<label class="layui-form-label">用户类型:</label>
						<div class="layui-input-block">
							<input type="text" name="userType" required
								lay-verify="required" placeholder="请输入" autocomplete="off"
								class="layui-input" value="0" id="usertype">
						</div>
					</div>
					<div class="layui-form-item" >
						<label class="layui-form-label">请选择类型:</label>
						<div class="layui-input-block">
							<select name="interest" lay-filter="lei">
								<option value="0" selected="">普通用户</option>
								<option value="1">评委</option>
								<option value="2">系统管理员</option>
								<option value="3">活动管理员</option>
								
							</select>
						</div>
					</div>

					<div class="layui-form-item">
						<div class="layui-input-block">
							<button class="layui-btn" lay-submit lay-filter="formUser">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
			</div>
			<div class="layui-tab-item" style="height: 550px;">
				<div style="width: 430px; float: left;">
					<table class="layui-hide" id="race" lay-filter="race"></table>
				</div>
				<div style="width: 360px; margin-left: 15px; float: left;">
					<form class="layui-form" action=""
						style="width: 350px; margin-left: auto; margin-right: auto; margin-top: 20px">
						<div class="layui-form-item">
							<label class="layui-form-label">选手id:</label>
							<div class="layui-input-block">
								<input type="text" name="sid" required lay-verify="required"
									placeholder="请输入选手id" autocomplete="off" class="layui-input"
									disabled="disabled" id="sid">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">歌名:</label>
							<div class="layui-input-block">
								<input type="text" name="singer" required lay-verify="required"
									placeholder="请输入歌名" autocomplete="off" class="layui-input">
							</div>
						</div>

						<div class="layui-form-item">
							<label class="layui-form-label">比赛id:</label>
							<div class="layui-input-block">
								<input type="text" name="rid" required lay-verify="required"
									placeholder="请点击表格" autocomplete="off" class="layui-input"
									disabled="disabled" id="rid">
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="formsingerrace">立即提交</button>
								<button type="reset" class="layui-btn layui-btn-primary">重置</button>
							</div>
						</div>
					</form>

				</div>
				<div style="width: 230px; float: left;">
					<table class="layui-hide" id="singerss" lay-filter="singerss"></table>
				</div>
			</div>
			<div class="layui-tab-item" style="height: 550px;">
				<table class="layui-hide" id="userinfor" lay-filter="userinfor"></table>
			</div>
			<div class="layui-tab-item" style="height: 550px;">
				<form class="layui-form" action=""
					style="width: 450px; margin-left: auto; margin-right: auto; margin-top: 20px">
					<div class="layui-form-item">
						<label class="layui-form-label">歌手姓名:</label>
						<div class="layui-input-block">
							<input type="text" name="singerName" required
								lay-verify="required" placeholder="请输入歌手姓名" autocomplete="off"
								class="layui-input">
						</div>
					</div>

					<div class="layui-form-item">
						<div class="layui-input-block">
							<button class="layui-btn" lay-submit lay-filter="formsinger">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
			</div>
			<div class="layui-tab-item" style="height: 550px; background: red">内容5</div>
		</div>
	</div>
	<div class="tenfoot"
		style="height: 60px; background: #2F4056; margin-top: -50px">
		<p class="footp">郑绪洪团队有限责任公司</p>
	</div>

	<script>
		layui.use([ 'element', 'table', 'form', 'layer' ], function() {
			var element = layui.element;
			var table = layui.table;
			var form = layui.form;
			var layer = layui.layer;
			table.render({
				elem : '#userinfor',
				url : '../system/showuser',
				width : 1000,
				height : 500,
				cols : [ [

				{
					field : 'usercode',
					width : 140,
					title : '用户账号'
				}, {
					field : 'username',
					width : 140,
					title : '用户名',
					edit : 'text'
				}, {
					field : 'password',
					width : 140,
					title : '密码',
					edit : 'text'
				}, {
					field : 'usertmp',
					width : 150,
					title : '用户手机号',
					edit : 'text'
				}, {
					field : 'useremail',
					width : 150,
					title : '用户邮箱',
					edit : 'text'
				}, {
					field : 'userType',
					width : 150,
					title : '用户类型'
				}, {
					fixed : 'right',
					width : 178,
					align : 'center',
					toolbar : '#barDemo'
				} ] ],
				page : true,
				limit : 5,
				limits : [ 5, 10, 15 ],
				response : {
					statusCode : 200
				// 重新规定成功的状态码为 200，table 组件默认为 0
				},
				parseData : function(res) { // res 即为原始返回的数据
					console.log(res);

					return {
						"code" : res.status, // 解析接口状态
						"msg" : res.message, // 解析提示文本
						"count" : res.tol, // 解析数据长度
						"data" : res.uservoteBeans
					// 解析数据列表
					};
				}
			});
		})
	</script>
	<script type="text/html" id="barDemo">
  
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
</body>

</html>